
package gov.chinatax.ctcps.generator.form;

import java.text.SimpleDateFormat;

import javax.servlet.http.HttpServletRequest;

import org.apache.struts.action.ActionError;
import org.apache.struts.action.ActionErrors;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionMapping;

/**
 * Form for xtglYszb.
 *
 * @author <a href="http://boss.bekk.no/boss/middlegen/"/>Middlegen</a>
 *
 * @struts.form name="xtglYszbForm"
 */
public class XtglYszbForm extends ActionForm {

   private final static SimpleDateFormat FORMAT = new SimpleDateFormat("dd.MM.yyyy hh:mm:ss");

   private java.lang.String _yszbbm = null;
   private java.lang.String _nd = null;
   private java.lang.String _zclxDm = null;
   private java.lang.String _yskmbh = null;
   private java.lang.String _sjyszbbm = null;
   private java.lang.String _ysxmbh = null;
   private java.lang.String _zbztBz = null;
   private java.lang.String _yzjdBz = null;
   private java.lang.String _zt1 = null;
   private java.lang.String _zt2 = null;

   /**
    * Standard constructor.
    */
   public XtglYszbForm() {
   }

   /**
    * Returns the yszbbm
    *
    * @return the yszbbm
    */
   public java.lang.String getYszbbm() {
      return _yszbbm;
   }

   /**
    * Sets the yszbbm
    *
    * @param yszbbm the new yszbbm value
    */
   public void setYszbbm(java.lang.String yszbbm) {
      _yszbbm = yszbbm;
   }
   /**
    * Returns the nd
    *
    * @return the nd
    */
   public java.lang.String getNd() {
      return _nd;
   }

   /**
    * Sets the nd
    *
    * @param nd the new nd value
    */
   public void setNd(java.lang.String nd) {
      _nd = nd;
   }
   /**
    * Returns the zclxDm
    *
    * @return the zclxDm
    */
   public java.lang.String getZclxDm() {
      return _zclxDm;
   }

   /**
    * Sets the zclxDm
    *
    * @param zclxDm the new zclxDm value
    */
   public void setZclxDm(java.lang.String zclxDm) {
      _zclxDm = zclxDm;
   }
   /**
    * Returns the yskmbh
    *
    * @return the yskmbh
    */
   public java.lang.String getYskmbh() {
      return _yskmbh;
   }

   /**
    * Sets the yskmbh
    *
    * @param yskmbh the new yskmbh value
    */
   public void setYskmbh(java.lang.String yskmbh) {
      _yskmbh = yskmbh;
   }
   /**
    * Returns the sjyszbbm
    *
    * @return the sjyszbbm
    */
   public java.lang.String getSjyszbbm() {
      return _sjyszbbm;
   }

   /**
    * Sets the sjyszbbm
    *
    * @param sjyszbbm the new sjyszbbm value
    */
   public void setSjyszbbm(java.lang.String sjyszbbm) {
      _sjyszbbm = sjyszbbm;
   }
   /**
    * Returns the ysxmbh
    *
    * @return the ysxmbh
    */
   public java.lang.String getYsxmbh() {
      return _ysxmbh;
   }

   /**
    * Sets the ysxmbh
    *
    * @param ysxmbh the new ysxmbh value
    */
   public void setYsxmbh(java.lang.String ysxmbh) {
      _ysxmbh = ysxmbh;
   }
   /**
    * Returns the zbztBz
    *
    * @return the zbztBz
    */
   public java.lang.String getZbztBz() {
      return _zbztBz;
   }

   /**
    * Sets the zbztBz
    *
    * @param zbztBz the new zbztBz value
    */
   public void setZbztBz(java.lang.String zbztBz) {
      _zbztBz = zbztBz;
   }
   /**
    * Returns the yzjdBz
    *
    * @return the yzjdBz
    */
   public java.lang.String getYzjdBz() {
      return _yzjdBz;
   }

   /**
    * Sets the yzjdBz
    *
    * @param yzjdBz the new yzjdBz value
    */
   public void setYzjdBz(java.lang.String yzjdBz) {
      _yzjdBz = yzjdBz;
   }
   /**
    * Returns the zt1
    *
    * @return the zt1
    */
   public java.lang.String getZt1() {
      return _zt1;
   }

   /**
    * Sets the zt1
    *
    * @param zt1 the new zt1 value
    */
   public void setZt1(java.lang.String zt1) {
      _zt1 = zt1;
   }
   /**
    * Returns the zt2
    *
    * @return the zt2
    */
   public java.lang.String getZt2() {
      return _zt2;
   }

   /**
    * Sets the zt2
    *
    * @param zt2 the new zt2 value
    */
   public void setZt2(java.lang.String zt2) {
      _zt2 = zt2;
   }


   /**
    * Validate the properties that have been set from this HTTP request,
    * and return an <code>ActionErrors</code> object that encapsulates any
    * validation errors that have been found.  If no errors are found, return
    * <code>null</code> or an <code>ActionErrors</code> object with no
    * recorded error messages.
    *
    * @param mapping The mapping used to select this instance
    * @param request The servlet request we are processing
    */
   public ActionErrors validate(ActionMapping mapping, HttpServletRequest request) {
      ActionErrors errors = new ActionErrors();
      // test for nullity
      if(getYszbbm() == null) {
         errors.add("yszbbm", new ActionError("error.yszbbm.required"));
      }
      if(getNd() == null) {
         errors.add("nd", new ActionError("error.nd.required"));
      }
      if(getZclxDm() == null) {
         errors.add("zclxDm", new ActionError("error.zclxDm.required"));
      }
      if(getYskmbh() == null) {
         errors.add("yskmbh", new ActionError("error.yskmbh.required"));
      }
      if(getZbztBz() == null) {
         errors.add("zbztBz", new ActionError("error.zbztBz.required"));
      }
      // TODO test format/data
      return errors;
   }
}
